package com.itheima.Service.impl;

import com.itheima.Dao.BookDao;
import com.itheima.Dao.impl.BookDaoimpl;
import com.itheima.Service.BookService;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.beans.factory.InitializingBean;

public class BookServiceimpl implements BookService , InitializingBean, DisposableBean {
    public BookDao bookDao;
    @Override
    public void save() {
        System.out.println("我是BookServiceimpl");
        bookDao.save();
    }

    public void setBookDao(BookDao bookDao) {
        this.bookDao = bookDao;
    }

    @Override
    public void destroy() throws Exception {
        System.out.println("销毁掉");
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("初始化");
    }
}
